<?php
/**
 * Created by PhpStorm.
 * User: ly
 * Date: 2017\12\11 0011
 * Time: 17:05
 */
use yii\widgets\LinkPager;
$this->title="我关注的项目";
?>
<div id="lists">
    <table>
        <tr><td>编号</td><td>名称</td><td>保证人</td></tr>
        <?PHP
        if(empty($data)){
            echo '当前没有会员';
        }else{
            foreach($data as $val){
                $project=$val['project'];
                echo '<tr><td>'.$project['id'].'</td><td>'.$project['title'].'</td><td>'.$project['guarantor'].'</td></tr>';
            }

        }
        ?>
    </table>
    <?PHP
    echo LinkPager::widget([
        'pagination' => $pages,
        'firstPageLabel' => '首页',
        'lastPageLabel' => '尾页',
        'nextPageLabel' => '下一页',
        'prevPageLabel' => '上一页'
    ]);
    ?>
    <!--    <script type="text/javascript">-->
    <!--        $(".pagination a").click(function (e) {-->
    <!--            e.preventDefault();-->
    <!--            var url=$(this).attr('href');-->
    <!--            $.get(url,function(msg){-->
    <!--                //alert(msg);-->
    <!--                $('#lists').html(msg);-->
    <!--            })-->
    <!---->
    <!--        });-->
    <!--    </script>-->
</div>
